const { ethers } = require("hardhat")

async function  main() {

    // const Task02 = await ethers.getContractFactory("Task02NFT")
    // console.log("begin deploy")
    // const fundMe = await  Task02.deploy("MyNFTToken", "NFT");
    // await  fundMe.waitForDeployment()
    // console.log(`contract has been deployed successfully, contract address is ${fundMe.target}`);

    const Task02 = await  ethers.getContractAt("Task02NFT", "0xb989a1E3C3161F77bE7925B4a3190439Ba8CCe72")

    const [firstAccount] = await ethers.getSigners()
    //
    // const fundTx = await fundMe.awardItem(firstAccount,"https://then-salmon-mole.myfilebase.com/ipfs/QmZcpXG1NykkeMfXyoB86cXtWi2Us53qzCw8LRSfqgeB4B")

    // console.log(await  fundMe.balanceOf(firstAccount))
    console.log(await  Task02.balanceOf(firstAccount))

}

main().then().catch(err => {
    console.error(err)
    process.exit(1)
})